<?php
// $Id: include/cp_functions.php,v 1.11 2004/12/02 C.Felix AKA the Cat
//  ------------------------------------------------------------------------ //
//             XF Guestbook                                                  //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

function admin_menu($currentoption=0)
{
    global $xoopsModule, $xoopsConfig;
    $tblColors=Array();
    $tblColors[0]=$tblColors[1]=$tblColors[2]=$tblColors[3]=$tblColors[4]='#DDE';
    $tblColors[$currentoption]='white';
    if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/modinfo.php')) {
        include_once '../language/'.$xoopsConfig['language'].'/modinfo.php';
    }
    else {
        include_once '../language/english/modinfo.php';
    }
	echo "<div id=\"navcontainer\"><ul style=\"padding: 3px 0; margin-left: 0; font: bold 12px Verdana, sans-serif; \">";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"index.php\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[0]."; text-decoration: none; \">"._AM_XFGB_MSGMANAGE."</a></li>";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"config.php\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[1]."; text-decoration: none; \">"._AM_XFGB_FORMOPT."</a></li>";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"country_manager.php\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[2]."; text-decoration: none; \">"._AM_XFGB_COUNTRYMANAGE."</a></li>";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=".$xoopsModule -> getVar( 'mid' )."\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[3]."; text-decoration: none; \">"._PREFERENCES."</a></li>";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"../index.php\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[4]."; text-decoration: none; \">"._AM_XFGB_GOINDEX."</a></li>";
	echo "</div></ul>";
}

function msg_menu($currentoption=0)
{
    global $xoopsModule, $xoopsConfig;
    $tblColors=Array();
    $tblColors[0]=$tblColors[1]=$tblColors[2]='#FDE';
    $tblColors[$currentoption]='white';
    if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/modinfo.php')) {
        include_once '../language/'.$xoopsConfig['language'].'/modinfo.php';
    }
    else {
        include_once '../language/english/modinfo.php';
    }
	echo "<div id=\"navcontainer\"><ul style=\"padding: 3px 0; margin-left: 0; font: bold 12px Verdana, sans-serif; \">";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"index.php?action=all\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[0]."; text-decoration: none; \">"._AM_XFGB_ALLMSG."</a></li>";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"index.php?action=published\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[1]."; text-decoration: none; \">"._AM_XFGB_PUBMSG."</a></li>";
	echo "<li style=\"list-style: none; margin: 0; display: inline; \"><a href=\"index.php?action=waiting\" style=\"padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblColors[2]."; text-decoration: none; \">"._AM_XFGB_WAITMSG."</a></li>";
	echo "</div></ul>";
}

function country_menu() {
    	echo "<div><h4>"._AM_XFGB_COUNTRYMANAGE."</h4></div>";
		echo "<table width='100%' border='0' cellpadding = '2' cellspacing='0' class='outer'>";
		echo "<tr class = 'even'><td>";
		echo "<div><a href='country_manager.php'>"._AM_XFGB_DISPCOUNTRY."</a></div>";
		echo "<div><a href='country_manager.php?op=countryAdd'>"._AM_XFGB_ADDCOUNTRY."</a></div>";
		echo "</td></tr></table><br>";
}

?>